Temenos Digital
Min(s) read

Favorite Account Fix

These updates are applicable for releases - 2021.04, 2021.07.

Please follow these steps to fix this issue

UI changes: Please add the below line of code in AccountsModule/PresentationControllers/PresentationController.js

Method Name: changeAccountFavouriteStatus

Email Id : applicationManager.getUserPreferencesManager().getUserEmail()

After adding the line it would look as below,

fav acct
Favorite account

Backend java code changes:

Please add this below method in

PackageName: com.infinity.dbx.temenos.accounts

ClassName: SetFavourateAccount

private boolean isValidEmailId(String email,String customerId) {
    try {
      ResultCache resultCache = ServicesManagerHelper.getServicesManager().getResultCache();
      String value = (String)resultCache.retrieveFromCache("USER_DETAILS" + customerId);
      JSONObject user = new JSONObject(value);
      JSONArray emailIds = (JSONArray)user.get("EmailIds");
      for (int i = 0; i < emailIds.length(); i++) {
        JSONObject emailId = emailIds.getJSONObject(i);
        String val = emailId.getString("Value");
        if (email.equals(val))
          return true;
      }
    } catch (Exception e) {
     
    }
    return false;
  }

Please add these highlighted lines at the top of the same class

favacct
Constants

Please declare emailId as below

favacct
Logger

Please replace the below highlighted else block with the below mentioned lines of code,

favacct
Accounts Constants
else {
      boolean isValidEmail = isValidEmailId(email,loginUserId);
      if(isValidEmail && getAccountsDS != null && !getAccountsDS.getAllRecords().isEmpty()){
      result.addStringParam("nickNameUpdateCall", "true");
      inputParams.put("id", UUID.randomUUID().toString());
      inputParams.put("Customer_id", loginUserId);
      inputParams.put("Account_id", accountId);
      inputParams.put("User_id", params.get("loginUserId").toString());
      inputParams.put("AccountName", nickName);
      if ("".equalsIgnoreCase(favouriteStatus)) {
        inputParams.put("FavouriteStatus", "1");
      } else {
        inputParams.put("FavouriteStatus", favouriteStatus);
      }
      CommonUtils.callIntegrationService(request, inputParams, headerParams,
          "dbpRbLocalServicesdb", "dbxdb_customeraccounts_create", false);
      }
    }

Fabric Changes:

Add a new parameter called emailId in Integration service T24ISExtra(1.0).setFavouriteAccount operation

Add emailId as below in Request Input,

favacctfix
T24

After adding this emailId,Click save operation below and republish the jar.

After republishing the jar,check the RBObjects object service, Accounts-> updateFavouriteStatus

Below nickName we should be able to see emailId also

sample mappings
Sample Mappings

please take a backup of the controllers, jars which ever we are changing and do these changes.

After these changes please reproduce the issue and let us know if the issue is fixed.

 

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Sunday, March 23, 2025 5:14:01 PM IST